const router = require('koa-router')();

router.post('/login',async (ctx)=>{
    const {body} = ctx.request;
    console.log(body);
    ctx.session.userinfo = body.user;
    ctx.body = {
        msg:'success'
    }
})

router.post('/getuser',async (ctx)=>{
    

   
    ctx.body = {
        msg:'success',
        info:ctx.session.userinfo
    }
})

module.exports = router